# Test CMake configuration

# Accuracy Tests
add_executable(accuracy_tests
    accuracy_tests.cpp
)

target_link_libraries(accuracy_tests
    sve_bonus
    gtest_main
)

target_include_directories(accuracy_tests PRIVATE
    ${CMAKE_SOURCE_DIR}/src/task1
    ${CMAKE_SOURCE_DIR}/src/task2
    ${CMAKE_SOURCE_DIR}/src/task3
)

# Performance Tests
add_executable(perf_tests
    performance_tests.cpp
)

target_link_libraries(perf_tests
    sve_bonus
    gtest_main
)

target_include_directories(perf_tests PRIVATE
    ${CMAKE_SOURCE_DIR}/src/task1
    ${CMAKE_SOURCE_DIR}/src/task2
    ${CMAKE_SOURCE_DIR}/src/task3
)

# Enable ARM SVE support for tests
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
    target_compile_options(accuracy_tests PRIVATE -march=native)
    target_compile_options(perf_tests PRIVATE -march=native)
endif()

# Optimization flags for tests
target_compile_options(accuracy_tests PRIVATE -O3)
target_compile_options(perf_tests PRIVATE -O3)

# Add tests to CTest
add_test(NAME AccuracyTests COMMAND accuracy_tests)
add_test(NAME PerformanceTests COMMAND perf_tests) 